import request from '@/utils/request'

// 查询设备告警设置列表
export function listAlarmSetting(query) {
  return request({
    url: '/biz/setting/list',
    method: 'get',
    params: query
  })
}

// 查询设备告警设置详细
export function getAlarmSetting(deviceId) {
  return request({
    url: '/biz/setting/' + deviceId,
    method: 'get'
  })
}

// 新增设备告警设置
export function addAlarmSetting(data) {
  return request({
    url: '/biz/setting',
    method: 'post',
    data: data
  })
}

// 修改设备告警设置
export function updateAlarmSetting(data) {
  return request({
    url: '/biz/setting',
    method: 'put',
    data: data
  })
}

// 删除设备告警设置
export function delAlarmSetting(id) {
  return request({
    url: '/biz/setting/' + id,
    method: 'delete'
  })
}

// 导出设备告警设置
export function exportAlarmSetting(query) {
  return request({
    url: '/biz/setting/export',
    method: 'get',
    params: query
  })
}